<?php
	class ConfigModel extends Model {
		public function __construct(){
			$this->open(Model::MYSQL);
			$this->calledClass(get_class($this));
		}
		public function findAsObject($where=array()){
			return parent::findAsObject($where);
		}
		public function save($fields=array()){
			$this->open(Model::MYSQL);
			return parent::save($fields);
		}
		public function update($fields=array(),$where=array()){
			$this->open(Model::MYSQL);
			return parent::update($fields,$where );
		}
		public function getConfigValue($table,$fieldname,$where=array()){
			$this->open(Model::MYSQL);
			return parent::getFieldValue($table,$fieldname,$where);
		}
		public function getAdminCutPoint(){
			$this->open(Model::MYSQL);
			$query = "SELECT publish_job FROM Configs ";
			$result = parent::query($query);
			$datas = mysql_fetch_object($result);
			return $datas->publish_job;
		}
		public function getExpireDateEditJob(){
			$this->open(Model::MYSQL);
			$query = "SELECT expiredate_editjob FROM Configs ";
			$result = parent::query($query);
			$datas = mysql_fetch_object($result);
			return $datas->expiredate_editjob;
		}
	}
?>